<admintpl file="header"/>
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>商户详情</a></li>
	</ul>
	<php>$types=['1'=>'商户',2=>'技师'];</php>
	<div class="div_to_table">
		<div><span class="div_to_table_bold">公司名</span><span>{$business.company}</span></div>
		<div><span class="div_to_table_bold">手机号</span><span>{$business.phone}</span></div>
		<div><span class="div_to_table_bold">店铺性质</span><span><php>echo $types[$business['type']];</php></span></div>
		<div><span class="div_to_table_bold">经营范围</span><span><php>echo $scopes[$business['scope_id']];</php></span></div>
        <div style="height: 120px" ><span class="div_to_table_bold"  style="height: 120px">必须的证件照（营业执照/身份证照）</span><span><php>if(!empty($business['identification_photo'])){echo '<img src="'.sp_get_image_preview_url($business['identification_photo']).'" style="width: 180px;height: 120px" />';}</php></span></div>
        <php>if($business['type']==1){</php>
        <div style="height: 120px" ><span class="div_to_table_bold"  style="height: 120px">法人手持身份证照</span><span><php>if(!empty($business['legal_person_photo'])){echo '<img src="'.sp_get_image_preview_url($business['legal_person_photo']).'" style="width: 180px;height: 120px" />';}</php></span></div>
        <php>}</php>
        <php>if($business['type']==2&&!empty($qualifies)){</php>
        <foreach name="qualifies" item="qualify">
            <div style="height: 120px" ><span class="div_to_table_bold" style="height: 120px">资质图</span><span><php>if(!empty($qualify['image'])){echo '<img src="'.sp_get_image_preview_url($qualify['image']).'" style="width: 180px;height: 120px" />';}</php></span></div>
        </foreach>
        <php>}</php>
	</div>
	<div class="form-actions" style="padding-left: 410px">
        <a class="btn js-ajax-dialog-btn" href="{:U('Business/checkCancelban',['id'=>$business['id']])}" style="margin-right: 65px" data-msg="确定审核么？">审核</a>
        <a class="btn showBan" href="javascript:;" style="margin-right: 65px" business_id="{$business.id}">驳回</a>
        <a class="btn" href="javascript:history.back(-1);">{:L('BACK')}</a>
	</div>
    <div style="width: 489px;height:287px;text-align: center;position: absolute;margin-left: 50%;left: -240px;margin-top:50%;top:0px;display: none;z-index:9;border: 1px solid #fff" id="banDiv">
        <div style="height: 40px;background: #f7f8fa;padding-top: 15px;text-align: left;padding-left: 22px">驳回<button type="button" style="border:none;width: 14px;background: #f7f8fa;color: #ccc;padding-left: 400px" id="hideBan">X</button></div>
        <div style="background: #fff;text-align: center;height: 210px;padding-top:33px">
            <div style="width: 200px;text-align: right;color: #666666">请输入驳回依据</div>
            <br>
            <textarea style="width: 200px;height: 91px;color: black;background: #f7f8fa;border: 1px solid #dae1e9" id="ban_message" ></textarea>
            <br>
            <button type="button" style="border:none;width: 215px;height: 30px;background: #19c571;color: #fff" id="ban">驳回</button>
        </div>
    </div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
<script>
    $('.showBan').click(function(r){
        var top=$(document).scrollTop();
        var height=$(window).height();
        height=parseInt(height)-132;
        top=-(height-parseInt(top));
        $('#banDiv').css('top',top);
        ban_business_id=$(this).attr('business_id');
        $('#banDiv').show();
        $('#banZhe').show();
    });
    $('#hideBan').click(function(r){
        ban_business_id=0;
        $('#banDiv').hide();
        $('#banZhe').hide();
    });
    $('#ban').click(function(r){
        var message=$('#ban_message').val();
        $.post('{:U("Business/checkBan")}',{id:ban_business_id,message:message},function(r){
            alert(r.info);
            if(r.status==1){
                window.location.href="{:U('Business/checkBusinesses')}"
            }
           // window.location.href = location.pathname + location.search;
        });
    });
</script>